package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbCaseMapper;
import com.bsb.base.model.BsbCase;
import com.bsb.base.model.BsbCaseExample;

@Service
public class BsbCaseService{
	
	@Resource
	private BsbCaseMapper bsbCaseMapper;
	
	public void addBsbCase(BsbCase bsbCase) {
		bsbCaseMapper.insertSelective(bsbCase);
	}
	
	public void delBsbCaseByUuid(String uuid) {
		bsbCaseMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateBsbCase(BsbCase bsbCase) {
		bsbCaseMapper.updateByPrimaryKeySelective(bsbCase);
	}
	
	public void updateBsbCaseByExample(BsbCase bsbCase,BsbCaseExample bsbCaseExample){
	    bsbCaseMapper.updateByExampleSelective(bsbCase,bsbCaseExample);
	}
	
	public BsbCase getBsbCaseByUuid(String uuid) {
		return bsbCaseMapper.selectByPrimaryKey(uuid);
	}
	
	public List<BsbCase> getPageBsbCase(BsbCaseExample bsbCaseExample) {
		return bsbCaseMapper.selectPage(bsbCaseExample);
	}
	
	public int countBsbCase(BsbCaseExample bsbCaseExample) {
		return bsbCaseMapper.countByExample(bsbCaseExample);
	}
	
	public List<BsbCase> selectByExample(BsbCaseExample example){
	    return bsbCaseMapper.selectByExample(example);
	}
}
